<?php

namespace App\Http\Requests\Frontend\V10\Auth;

use App\Rules\MobileCheck;
use Illuminate\Foundation\Http\FormRequest;

class WebSmsRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'phone_num'=>['bail','required',new MobileCheck]
        ];
    }

    public function messages()
    {
        return [
            'phone_num.required' => '手机号码不能为空',
        ];
    }

}
